package com.walker.spring.config;

import com.walker.spring.service.FunctionService;
import com.walker.spring.service.UseFunctionService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * java配置
 *
 * @author qinmu
 * @create 2017-10-11-20:54
 */
@Configuration
public class JavaConfig {

    /**
     * @Bean:注解在方法上,声明当前方法的返回值为一个bean
     * @return
     */
    @Bean
    public UseFunctionService useFunctionService() {
        UseFunctionService useFunctionService = new UseFunctionService();
        useFunctionService.setFunctionService(new FunctionService());
        return useFunctionService;
    }
}
